<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>贪吃蛇</title>
    <style>
        .map {
            width: 860px;
            height: 620px;
            background-color: #ccc;
            position: relative;
            left: 50%;
            top: 12px;
            transform: translateX(-50%);
        }
    </style>
</head>

<body>
    <div class="map" id="map"></div>
    <script src="./JS文件/Food.js"></script>
    <script src="./JS文件/Snake.js"></script>
    <script src="./JS文件/Game.js"></script>
    <script>
        // 1. 获取地图
        let map = document.getElementById('map')
        // 2. 创建一个游戏控制器对象
        let game=new Game(map)
        // 调用游戏开始的方法
        game.start()
    </script>
</body>

</html>